home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1995 February: Tool Chest / Dev.CD Feb 95 / Dev.CD Feb 95.toast / Tool Chest / Interfaces / Universal Interfaces 2.0a3 / Universal AIncludes / Processes.a < prev    next >
Encoding:
Text File  |  1994-11-11  |  4.6 KB  |  212 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        Processes.a
  3. ;
  4. ;    Copyright:    © 1984-1994 by Apple Computer, Inc.
  5. ;                All rights reserved.
  6. ;
  7. ;    Version:    Universal Interfaces 2.0a3  ETO #16, MPW prerelease.  Friday, November 11, 1994. 
  8. ;
  9. ;    Bugs?:        If you find a problem with this file, send the file and version
  10. ;                information (from above) and the problem description to:
  11. ;
  12. ;                    Internet:    apple.bugs@applelink.apple.com
  13. ;                    AppleLink:    APPLE.BUGS
  14. ;
  15. ;
  16.  
  17.     IF &TYPE('__PROCESSES__') = 'UNDEFINED' THEN
  18. __PROCESSES__ SET 1
  19.  
  20.  
  21.     IF &TYPE('__TYPES__') = 'UNDEFINED' THEN
  22.     include 'Types.a'
  23.     ENDIF
  24. ;        include 'ConditionalMacros.a'                                ;
  25.  
  26.     IF &TYPE('__EVENTS__') = 'UNDEFINED' THEN
  27.     include 'Events.a'
  28.     ENDIF
  29. ;        include 'Quickdraw.a'                                        ;
  30. ;            include 'MixedMode.a'                                    ;
  31. ;            include 'QuickdrawText.a'                                ;
  32. ;        include 'OSUtils.a'                                        ;
  33. ;            include 'Memory.a'                                        ;
  34.  
  35.     IF &TYPE('__FILES__') = 'UNDEFINED' THEN
  36.     include 'Files.a'
  37.     ENDIF
  38. ProcessSerialNumber     RECORD    0
  39. highLongOfPSN             ds.l    1
  40. lowLongOfPSN             ds.l    1
  41. sizeof                     EQU    8
  42.                         ENDR
  43.  
  44.  
  45. ; Process identifier - Various reserved process serial numbers 
  46. kNoProcess                        EQU        0
  47. kSystemProcess                    EQU        1
  48. kCurrentProcess                    EQU        2
  49.  
  50. ; Definition of the parameter block passed to _Launch
  51. ;    Typedef and flags for launchControlFlags field 
  52. ; Definition of the parameter block passed to _Launch 
  53. launchContinue                    EQU        $4000
  54. launchNoFileFlags                EQU        $0800
  55. launchUseMinimum                EQU        $0400
  56. launchDontSwitch                EQU        $0200
  57. launchAllow24Bit                EQU        $0100
  58. launchInhibitDaemon                EQU        $0080
  59.  
  60. ; Format for first AppleEvent to pass to new process.  The size of the overall
  61. ;  buffer variable: the message body immediately follows the messageLength 
  62. AppParameters             RECORD    0
  63. theMsgEvent                 ds        EventRecord
  64. eventRefCon                 ds.l    1
  65. messageLength             ds.l    1
  66. sizeof                     EQU    24
  67.                         ENDR
  68.  
  69. ; Parameter block to _Launch 
  70. LaunchParamBlockRec     RECORD    0
  71. reserved1                 ds.l    1
  72. reserved2                 ds.w    1
  73. launchBlockID             ds.w    1
  74. launchEPBLength             ds.l    1
  75. launchFileFlags             ds.w    1
  76. launchControlFlags         ds.w    1
  77. launchAppSpec             ds.l    1
  78. launchProcessSN             ds        ProcessSerialNumber
  79. launchPreferredSize         ds.l    1
  80. launchMinimumSize         ds.l    1
  81. launchAvailableSize         ds.l    1
  82. launchAppParameters         ds.l    1
  83. sizeof                     EQU    44
  84.                         ENDR
  85.  
  86. ; Set launchBlockID to extendedBlock to specify that extensions exist.
  87. ; Set launchEPBLength to extendedBlockLen for compatibility.
  88.  
  89. ; Definition of the information block returned by GetProcessInformation 
  90. modeDeskAccessory                EQU        $00020000
  91. modeMultiLaunch                    EQU        $00010000
  92. modeNeedSuspendResume            EQU        $00004000
  93. modeCanBackground                EQU        $00001000
  94. modeDoesActivateOnFGSwitch        EQU        $00000800
  95. modeOnlyBackground                EQU        $00000400
  96. modeGetFrontClicks                EQU        $00000200
  97. modeGetAppDiedMsg                EQU        $00000100
  98. mode32BitCompatible                EQU        $00000080
  99. modeHighLevelEventAware            EQU        $00000040
  100. modeLocalAndRemoteHLEvents        EQU        $00000020
  101. modeStationeryAware                EQU        $00000010
  102. modeUseTextEditServices            EQU        $00000008
  103. modeDisplayManagerAware            EQU        $00000004
  104.  
  105. ; Record returned by GetProcessInformation 
  106. ProcessInfoRec             RECORD    0
  107. processInfoLength         ds.l    1
  108. processName                 ds.l    1
  109. processNumber             ds        ProcessSerialNumber
  110. processType                 ds.l    1
  111. processSignature         ds.l    1
  112. processMode                 ds.l    1
  113. processLocation             ds.l    1
  114. processSize                 ds.l    1
  115. processFreeMem             ds.l    1
  116. processLauncher             ds        ProcessSerialNumber
  117. processLaunchDate         ds.l    1
  118. processActiveTime         ds.l    1
  119. processAppSpec             ds.l    1
  120. sizeof                     EQU    60
  121.                         ENDR
  122.  
  123.     IF GENERATING68K THEN
  124.         _LaunchApplication:    OPWORD    $A9F2
  125.     ELSE
  126.         IMPORT    LaunchApplication
  127.     ENDIF
  128.  
  129.     IF GENERATING68K THEN
  130.         Macro
  131.         _LaunchDeskAccessory
  132.             move.w    #$0036,-(sp)
  133.             dc.w     $A88F
  134.         EndM
  135.     ELSE
  136.         IMPORT    LaunchDeskAccessory
  137.     ENDIF
  138.  
  139.     IF GENERATING68K THEN
  140.         Macro
  141.         _GetCurrentProcess
  142.             move.w    #$0037,-(sp)
  143.             dc.w     $A88F
  144.         EndM
  145.     ELSE
  146.         IMPORT    GetCurrentProcess
  147.     ENDIF
  148.  
  149.     IF GENERATING68K THEN
  150.         Macro
  151.         _GetFrontProcess
  152.             dc.w     $70FF
  153.             dc.w     $2F00
  154.             move.w    #$0039,-(sp)
  155.             dc.w     $A88F
  156.         EndM
  157.     ELSE
  158.         IMPORT    GetFrontProcess
  159.     ENDIF
  160.  
  161.     IF GENERATING68K THEN
  162.         Macro
  163.         _GetNextProcess
  164.             move.w    #$0038,-(sp)
  165.             dc.w     $A88F
  166.         EndM
  167.     ELSE
  168.         IMPORT    GetNextProcess
  169.     ENDIF
  170.  
  171.     IF GENERATING68K THEN
  172.         Macro
  173.         _GetProcessInformation
  174.             move.w    #$003A,-(sp)
  175.             dc.w     $A88F
  176.         EndM
  177.     ELSE
  178.         IMPORT    GetProcessInformation
  179.     ENDIF
  180.  
  181.     IF GENERATING68K THEN
  182.         Macro
  183.         _SetFrontProcess
  184.             move.w    #$003B,-(sp)
  185.             dc.w     $A88F
  186.         EndM
  187.     ELSE
  188.         IMPORT    SetFrontProcess
  189.     ENDIF
  190.  
  191.     IF GENERATING68K THEN
  192.         Macro
  193.         _WakeUpProcess
  194.             move.w    #$003C,-(sp)
  195.             dc.w     $A88F
  196.         EndM
  197.     ELSE
  198.         IMPORT    WakeUpProcess
  199.     ENDIF
  200.  
  201.     IF GENERATING68K THEN
  202.         Macro
  203.         _SameProcess
  204.             move.w    #$003D,-(sp)
  205.             dc.w     $A88F
  206.         EndM
  207.     ELSE
  208.         IMPORT    SameProcess
  209.     ENDIF
  210.  
  211.     ENDIF ; __PROCESSES__
  212.